/*
    Android UIML

	Copyright (C) 2010  Bram Goffings (bramgoffings@gmail.com)

	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public License
	as published by the Free Software Foundation; either version 2.1
	of	the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

package uiml.android.elements;

import java.util.ArrayList;

import org.w3c.dom.Element;

import uiml.android.elements.peers.DComponent;

public class Logic extends UimlElementWithAttributes{
	
	// TODO comment
	private ArrayList<DComponent> components = new ArrayList<DComponent>();

	// TODO comment
	public static String IAM = "logic";
	public final String DCOMPONENT = "d-component";
	
	/**
	 * 
	 * @param node
	 */
	public Logic(Element node) {
		super(node);
		process();
	}

	/**
	 * 
	 */
	@Override
	public void processElement(Element elem) {
		
		if(elem.getTagName().equals(DCOMPONENT))
			components.add(new DComponent(elem));
	}
	
	/**
	 * 
	 * @return
	 */
	public ArrayList<DComponent> getComponents() {
		return components;
	}

	/**
	 * 
	 * @param components
	 */
	public void setComponents(ArrayList<DComponent> components) {
		this.components = components;
	}	

}
